<template>
	<view class="mark-detail-page">
		<view class="text">
			<view class="content">
				<text>{{detail.mark}}</text>
			</view>
			<view class="count">
				<text>{{detail.mark.length}} / 500</text>
			</view>
		</view>
		
		<image :src="detail.mark_img" mode="aspectFill"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail: {}
			};
		},
		onLoad({ evaluation_sheet_id, module_id, subject_id }) {
			const query = { evaluation_sheet_id, module_id, subject_id }
			
			this.getDetail(query)
		},
		
		methods: {
			getDetail(query) {
				uni.showLoading({
					title: '加载中...',
					mask: true
				})
				
				this.$u.post('/evaluationsheetdetail', query).then(res => {
					if(res) {
						this.detail = res
					} else {
						uni.showToast({
							icon: 'none',
							title: '暂无备注'
						})
						
						// setTimeout(() => {
						// 	uni.navigateBack({
						// 		delta: 1
						// 	})
						// }, 1500)
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.mark-detail-page {
	min-height: 100vh;
	background-color: white;
	
	>.text {
		padding: 30rpx;
		background-color: #F5F5F5;
		
		>.content {
			min-height: 320rpx;
			font-size: 32rpx;
			font-weight: 400;
			line-height: 44rpx;
			color: #131415;
		}
		
		>.count {
			margin-top: 10rpx;
			font-size: 24rpx;
			font-weight: 400;
			line-height: 34rpx;
			color: #999999;
			text-align: end;
		}
	}
	
	>image {
		width: 160rpx;
		height: 160rpx;
	}
}
</style>
